import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [{
            path: '/',
            redirect: '/login'
        },
        {
            path: '/',
            component: () =>
                import ( /* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [{
                    path: '/dashboard',
                    component: () =>
                        import ( /* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/statistics',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/finance.vue'),
                    meta: { title: '收支总览' }
                },
                {
                    path: '/members',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/member.vue'),
                    meta: { title: '会员列表' }
                },
                {
                    path: '/Vehicle',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/car-list.vue'),
                    meta: { title: '车辆列表' }
                },
                {
                    path: '/categorySetting',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/categoryManage.vue'),
                    meta: { title: '分类设置' }
                },
                {
                    path: '/brandSetting',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/brandManage.vue'),
                    meta: { title: '品牌设置' }
                },
                {
                    path: '/stocks',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/stocks.vue'),
                    meta: { title: '库存管理' }
                },
                {
                    path: '/companyview',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/companyview.vue'),
                    meta: { title: '公司统计' }
                },
                {
                    path: '/weighted',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/weighted.vue'),
                    meta: { title: '总监加权分红' }
                },
                {
                    path: '/regionAgent',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/regionAgent.vue'),
                    meta: { title: '市/区总代理' }
                },
                {
                    path: '/teamview',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/teamview.vue'),
                    meta: { title: '团队业绩' }
                },
                {
                    path: '/agentArea',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/agentArea.vue'),
                    meta: { title: '代理省市' }
                },
                {
                    path: '/agentUser',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/agentUser.vue'),
                    meta: { title: '代理用户列表' }
                },
                {
                    path: '/agentApproval',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/agentApproval.vue'),
                    meta: { title: '代理商审批' }
                },
                {
                    path: '/withdraw',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/withdraw.vue'),
                    meta: { title: '提现记录' }
                },
                {
                    path: '/merchantbill',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/bill.vue'),
                    meta: { title: '商家每日账单' }
                },
                {
                    path: '/balancedetail',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/vip.vue'),
                    meta: { title: '收支明细' }
                },
                {
                    path: '/commodityList',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/commodityList.vue'),
                    meta: { title: '商品列表' }
                },
                {
                    path: '/cardModel',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/cardModel.vue'),
                    meta: { title: '卡片模板' }
                },
                {
                    path: '/cardGrant',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/cardGrant.vue'),
                    meta: { title: '批量发卡' }
                },
                {
                    path: '/saleCount',
                    component: () =>
                        import ( /* webpackChunkName: "table" */ '../components/page/saleCount.vue'),
                    meta: { title: '商品销售统计' }
                },
                {
                    // 富文本编辑器组件
                    path: '/editor',
                    component: () =>
                        import ( /* webpackChunkName: "editor" */ '../components/page/VueEditor.vue'),
                    meta: { title: '富文本编辑器' }
                },{
                    // 富文本编辑器组件
                    path: '/unDeliverOrder',
                    component: () =>
                      import(/* webpackChunkName: "editor" */ '../components/page/unDeliverOrder.vue'),
                    meta: { title: '待发货订单' }
                  }, {
                    // 富文本编辑器组件
                    path: '/deliveredOrder',
                    component: () =>
                      import(/* webpackChunkName: "editor" */ '../components/page/deliveredOrder.vue'),
                    meta: { title: '已发货订单' }
                  }, {
                    // 富文本编辑器组件
                    path: '/unPaymentOrder',
                    component: () =>
                      import(/* webpackChunkName: "editor" */ '../components/page/unPaymentOrder.vue'),
                    meta: { title: '未支付订单' }
                  }, {
                    // 富文本编辑器组件
                    path: '/finishOrder',
                    component: () =>
                      import(/* webpackChunkName: "editor" */ '../components/page/finishOrder.vue'),
                    meta: { title: '已完成订单' }
                  },
                {
                    // markdown组件
                    path: '/markdown',
                    component: () =>
                        import ( /* webpackChunkName: "markdown" */ '../components/page/Markdown.vue'),
                    meta: { title: 'markdown编辑器' }
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: () =>
                        import ( /* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
                    meta: { title: '文件上传' }
                },
                {
                    // vue-schart组件
                    path: '/charts',
                    component: () =>
                        import ( /* webpackChunkName: "chart" */ '../components/page/BaseCharts.vue'),
                    meta: { title: 'schart图表' }
                },
                {
                    // 拖拽列表组件
                    path: '/drag',
                    component: () =>
                        import ( /* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
                    meta: { title: '拖拽列表' }
                },
                {
                    // 国际化组件
                    path: '/i18n',
                    component: () =>
                        import ( /* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
                    meta: { title: '国际化' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: () =>
                        import ( /* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    component: () =>
                        import ( /* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () =>
                        import ( /* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                }
            ]
        },
        {
            path: '/login',
            component: () =>
                import ( /* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});